package com.landeb.shop.huo.frag;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.google.gson.Gson;
import com.landeb.shop.R;
import com.landeb.shop.huo.BannerLoader;
import com.landeb.shop.huo.Json2Act;
import com.landeb.shop.huo.MyApplication;
import com.landeb.shop.huo.act.MainActivity;
import com.landeb.shop.huo.act.SearchActivity;
import com.landeb.shop.huo.act.WelcomeActivity;
import com.landeb.shop.huo.adapter.FixedFragHomeGVAdapter;
import com.landeb.shop.huo.bean.BeanFixedFragHome;
import com.landeb.shop.huo.httpRequest.FixedFragHomeRequest;
import com.landeb.shop.huo.httpRequest.FragHomeRequest;
import com.landeb.shop.huo.view.FixedGridView;
import com.landeb.shop.huo.view.MyBadgeItem;
import com.sunfusheng.marqueeview.MarqueeView;
import com.uuzuche.lib_zxing.activity.CaptureActivity;
import com.youth.banner.Banner;
import com.youth.banner.listener.OnBannerListener;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by qiling on 2017/7/26.
 */

public class FixedFragHome extends Fragment implements View.OnClickListener {

    private static final String GSON = "{\"status\":1,\"info\":\"\\u6210\\u529f\",\"data\":{\"keyword\":\"\\u597d\\u5403\\u7684\\u6c34\\u841d\\u535c\",\"slider\":[{\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2317\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/d5e4c2746e85a79c361bc23075e97aaf.jpg\"},{\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2317\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/6b6de9f1c5f8562fe066789e8e47f244.jpg\"},{\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2317\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/8b32de1f26727027e62b22446c967d4b.jpg\"}],\"cates\":[{\"name\":\"\\u7eff\\u8272\\u6709\\u673a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/lvse.png\"},{\"name\":\"\\u7cae\\u6cb9\\u8c03\\u5473\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/liangyou.png\"},{\"name\":\"\\u4f11\\u95f2\\u98df\\u54c1\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/xiuxian.png\"},{\"name\":\"\\u9152\\u6c34\\u996e\\u6599\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/jiushui.png\"},{\"name\":\"\\u575a\\u679c\\u7092\\u8d27\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/jianguo.png\"},{\"name\":\"\\u5730\\u65b9\\u5c55\\u5385\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/difang.png\"},{\"name\":\"\\u79ef\\u5206\\u5546\\u57ce\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/jifen.png\"},{\"name\":\"\\u6d3b\\u52a8\\u4e13\\u533a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/huodong.png\"},{\"name\":\"\\u4f1a\\u5458\\u4e13\\u533a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/huiyuan.png\"},{\"name\":\"\\u4f11\\u95f2\\u519c\\u573a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/nongchang.png\"}],\"news\":[{\"title\":\"\\u3010\\u4e0a\\u65b0\\u3011\\u604b\\u6f6e\\u6d77\\u9e2d\\u86cb 20\\u679a \",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2317\\\"}\"},{\"title\":\"\\u3010\\u7279\\u4ef7\\u3011\\u5409\\u7965\\u73cd\\u797a \\u6625\\u8033 250g\\/\\u888b \",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2395\\\"}\"},{\"title\":\"\\u3010\\u63a8\\u8350\\u3011\\u897f\\u57df\\u5df4\\u90ce\\u4ed4 \\u7ea2\\u9999\\u5983\\uff08\\u7279\\u7ea7\\uff09 500g\\/\\u888b \",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"2235\\\"}\"}],\"miaosha_time\":[{\"id\":\"1\",\"time\":\"9:00\"},{\"id\":\"2\",\"time\":\"12:00\"},{\"id\":\"3\",\"time\":\"13:00\"},{\"id\":\"4\",\"time\":\"15:00\"}],\"miaosha_goods\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/e9c5a7c1ddd5ca2e08c671672f22e9f7.jpg\",\"title\":\"\\u6052\\u742a\\u8089\\u677e\\u997c 50\\u888b*100g \\u6574\\u7bb1\\u529e\\u516c\\u5ba4\\u96f6\\u98df\\u5c0f\\u5403\\u4f20\\u7edf\\u7cd5\\u70b9\\u70b9\\u5fc3\\u7279\\u4ea7\\u4f11\\u95f2\\u7f8e\\u98df\",\"price\":\"98.80\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"907\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/f702ebc99bb0e026e602b298cf2c0728.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8089\\u677e\\u997c100g*50\\u888b \\u7b2c\\u4e09\\u4ee3\\u8001\\u5a46\\u997c \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u5e7f\\u4e1c\\u4f20\\u7edf\\u7cd5\\u70b9 \\u65e9\\u9910\\u96f6\\u98df\\u6279\\u53d1\",\"price\":\"100.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"908\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/6cd31c175873d3eca2adb9ab82fcd1c3.jpg\",\"title\":\"\\u6052\\u742a\\u828b\\u5934\\u9985\\u997c100g*50\\u888b \\u4f20\\u7edf\\u7f8e\\u98df\\u7cd5\\u70b9\\u7c7b\\u8001\\u5a46\\u997c\\u6279\\u53d1 \\u5e7f\\u4e1c\\u7279\\u8272\\u98ce\\u5473\\u4f11\\u95f2\\u96f6\\u98df\",\"price\":\"104.70\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"909\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/65cf7e09728f945f507b3bedda8358d4.jpg\",\"title\":\"\\u4f9b\\u5e94 \\u9171\\u811618g \\u6e56\\u5357\\u7279\\u4ea7\\u9ebb\\u8fa3\\u719f\\u98df\\u96f6\\u98df \\u9999\\u8fa3\\u8116\\u5b50\\u7279\\u8272\\u5c0f\\u5403\\u5e74\\u8d27\\u6279\\u53d1\",\"price\":\"1.20\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"910\\\"}\"}],\"news_pic\":{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/ads\\/fanxian.jpg\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u8bf7\\\\u5230\\\\u7528\\\\u6237\\\\u4e2d\\\\u5fc3\\\\u8fdb\\\\u884c\\\\u5145\\\\u503c\\\\u64cd\\\\u4f5c!\\\"}\"},\"goods_week\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/e9c5a7c1ddd5ca2e08c671672f22e9f7.jpg\",\"title\":\"\\u6052\\u742a\\u8089\\u677e\\u997c 50\\u888b*100g \\u6574\\u7bb1\\u529e\\u516c\\u5ba4\\u96f6\\u98df\\u5c0f\\u5403\\u4f20\\u7edf\\u7cd5\\u70b9\\u70b9\\u5fc3\\u7279\\u4ea7\\u4f11\\u95f2\\u7f8e\\u98df\",\"price\":\"98.80\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"907\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/f702ebc99bb0e026e602b298cf2c0728.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8089\\u677e\\u997c100g*50\\u888b \\u7b2c\\u4e09\\u4ee3\\u8001\\u5a46\\u997c \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u5e7f\\u4e1c\\u4f20\\u7edf\\u7cd5\\u70b9 \\u65e9\\u9910\\u96f6\\u98df\\u6279\\u53d1\",\"price\":\"100.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"908\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/6cd31c175873d3eca2adb9ab82fcd1c3.jpg\",\"title\":\"\\u6052\\u742a\\u828b\\u5934\\u9985\\u997c100g*50\\u888b \\u4f20\\u7edf\\u7f8e\\u98df\\u7cd5\\u70b9\\u7c7b\\u8001\\u5a46\\u997c\\u6279\\u53d1 \\u5e7f\\u4e1c\\u7279\\u8272\\u98ce\\u5473\\u4f11\\u95f2\\u96f6\\u98df\",\"price\":\"104.70\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"909\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/65cf7e09728f945f507b3bedda8358d4.jpg\",\"title\":\"\\u4f9b\\u5e94 \\u9171\\u811618g \\u6e56\\u5357\\u7279\\u4ea7\\u9ebb\\u8fa3\\u719f\\u98df\\u96f6\\u98df \\u9999\\u8fa3\\u8116\\u5b50\\u7279\\u8272\\u5c0f\\u5403\\u5e74\\u8d27\\u6279\\u53d1\",\"price\":\"1.20\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"910\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/feb446244723c589365321670283bd24.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8089\\u677e\\u997c5kg\\u4e00\\u7bb1 \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u5e7f\\u4e1c\\u4f20\\u7edf\\u7cd5\\u70b9 \\u65e9\\u9910\\u96f6\\u98df\\u6279\\u53d1\",\"price\":\"110.60\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"911\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/af9990c00b39fdb177bd1b0a1a03405c.jpg\",\"title\":\"\\u6052\\u742a\\u9999\\u65b0\\u4e00\\u4ee3\\u8001\\u5a46\\u997c\\u6279\\u53d1 \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u7ecf\\u5178\\u4f20\\u7edf\\u7f8e\\u5473\\u98df\\u54c1 70*100g\",\"price\":\"150.60\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"912\\\"}\"}],\"goods_fruit\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u6c34\\\\u679c\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/ads\\/shuiguo.jpg\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/03c50ac7c0aa9c7ac7c550b22e938fc1.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8001\\u5a46\\u997c \\u5382\\u5bb6\\u4f11\\u95f2\\u98df\\u54c1\\u76f4\\u9500 \\u5e7f\\u5f0f\\u7279\\u8272\\u7cd5\\u70b9\\u7c7b\\u96f6\\u98df\\u6279\\u53d1 30*160g \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"106.40\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"915\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/e248376a5822ca88ca0410a7463d5600.jpg\",\"title\":\"\\u6052\\u742a\\u9999\\u828b\\u9985\\u997c\\u8001\\u5a46\\u997c\\u6279\\u53d1 \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u7ecf\\u5178\\u4f20\\u7edf\\u7f8e\\u5473\\u98df\\u54c1 50*100g \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"77.70\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"916\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/5985f9c7654e48db666a0a2126daff24.jpg\",\"title\":\"\\u4f11\\u95f2\\u98df\\u54c1\\u6279\\u53d1 \\u6052\\u742a\\u6e2f\\u5f0f\\u8001\\u5a46\\u997c \\u4f20\\u7edf\\u7279\\u8272\\u7cd5\\u70b9\\u7c7b\\u5c0f\\u5403\\u96f6\\u98df \\u7279\\u4ef730\\u888b*160g \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"110.60\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"917\\\"}\"}]},\"goods_meat\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u8089\\\\u79bd\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/ads\\/rouqin.jpg\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/ec42a335d4d702d7a641459794da6a98.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8089\\u677e\\u8106\\u997c100g0 \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u5e7f\\u4e1c\\u4f20\\u7edf\\u7cd5\\u70b9 \\u65e9\\u9910\\u96f6\\u98df\\u6279\\u53d1 \\u4e00\\u4ef6\\u6279\\u53d1\",\"price\":\"11.70\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"918\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/479a4253a9eeca575b22cc03d4e00c93.jpg\",\"title\":\"\\u7c73\\u591a\\u7c73\\u82b1\\u751f\\u7cd6 \\u6d77\\u5357\\u4f11\\u95f2\\u96f6\\u98df\\u5382\\u5bb6\\u73b0\\u8d27\\u6279\\u53d1250g\\u82b1\\u751f\\u7cd6 \\u5c0f\\u98df\\u54c1\",\"price\":\"23.10\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"919\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/9692fbe154e5bb95e6d3192680358f59.jpg\",\"title\":\"\\u7c73\\u591a\\u7c73\\u829d\\u9ebb\\u7cd6 250\\u514b\\u6d77\\u5357\\u7279\\u8272\\u4f20\\u7edf\\u7cd5\\u70b9\\u829d\\u9ebb\\u7cd6\\u5382\\u5bb6\\u76f4\\u9500 \\u4f11\\u95f2\\u96f6\\u98df\",\"price\":\"23.10\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"920\\\"}\"}]},\"goods_seafood\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u6d77\\\\u9c9c\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/ads\\/haixian.jpg\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/ec42a335d4d702d7a641459794da6a98.jpg\",\"title\":\"\\u6052\\u742a\\u98df\\u54c1\\u8089\\u677e\\u8106\\u997c100g0 \\u4f11\\u95f2\\u96f6\\u98df\\u6279\\u53d1 \\u5e7f\\u4e1c\\u4f20\\u7edf\\u7cd5\\u70b9 \\u65e9\\u9910\\u96f6\\u98df\\u6279\\u53d1 \\u4e00\\u4ef6\\u6279\\u53d1\",\"price\":\"11.70\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"918\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/479a4253a9eeca575b22cc03d4e00c93.jpg\",\"title\":\"\\u7c73\\u591a\\u7c73\\u82b1\\u751f\\u7cd6 \\u6d77\\u5357\\u4f11\\u95f2\\u96f6\\u98df\\u5382\\u5bb6\\u73b0\\u8d27\\u6279\\u53d1250g\\u82b1\\u751f\\u7cd6 \\u5c0f\\u98df\\u54c1\",\"price\":\"23.10\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"919\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/9692fbe154e5bb95e6d3192680358f59.jpg\",\"title\":\"\\u7c73\\u591a\\u7c73\\u829d\\u9ebb\\u7cd6 250\\u514b\\u6d77\\u5357\\u7279\\u8272\\u4f20\\u7edf\\u7cd5\\u70b9\\u829d\\u9ebb\\u7cd6\\u5382\\u5bb6\\u76f4\\u9500 \\u4f11\\u95f2\\u96f6\\u98df\",\"price\":\"23.10\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"920\\\"}\"}]},\"goods_import\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u8fdb\\\\u53e3\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/ads\\/jinkou.jpg\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/cbc72b85e9b13330d29832c7270eaf16.jpg\",\"title\":\"\\u725b\\u8089\\u5e72 \\u5185\\u8499\\u53e4\\u98ce\\u5e72\\u725b\\u8089\\u5e72\\u624b\\u6495 \\u8d64\\u5cf0\\u7279\\u4ea7\\u96f6\\u98df \\u8349\\u539f\\u8fea\\u5a1c\\u725b\\u8089\\u5e72\\u5b5c\\u7136\\u5473360g\",\"price\":\"156.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1190\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/a016af4143940041381b808bf2de27c7.jpg\",\"title\":\"\\u725b\\u8089\\u5e72 \\u5185\\u8499\\u53e4\\u98ce\\u5e72\\u725b\\u8089\\u5e72\\u624b\\u6495 \\u8d64\\u5cf0\\u7279\\u4ea7\\u96f6\\u98df \\u8349\\u539f\\u8fea\\u5a1c\\u725b\\u8089\\u5e72\\u9ebb\\u8fa3200g\",\"price\":\"98.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1191\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/d3745807a058e4ae57455ec9a99c826f.jpg\",\"title\":\"\\u725b\\u8089\\u5e72 \\u5185\\u8499\\u53e4\\u98ce\\u5e72\\u725b\\u8089\\u5e72\\u624b\\u6495 \\u8d64\\u5cf0\\u7279\\u4ea7\\u96f6\\u98df \\u8349\\u539f\\u8fea\\u5a1c\\u725b\\u8089\\u5e72\\u9ebb\\u8fa3360g\",\"price\":\"156.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1192\\\"}\"}]},\"goods_more\":[{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/d40423d0482613a7c550e4dfac2f6dcf.jpg\",\"title\":\"\\u4e2d\\u8336\\u9ed1\\u8336\\u56ed\\u767e\\u5e74\\u6728\\u4ed3\\u6e56\\u5357\\u5b89\\u5316\\u9ed1\\u8336\\u91d1\\u82b1\\u832f\\u78161KG\\u624b\\u7b51\\u832f\\u7816K15-7\",\"price\":\"268.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1062\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/7b0f3e090ec700341cd9bdd6f922131e.jpg\",\"title\":\"\\u6e56\\u5357\\u5b89\\u5316\\u9ed1\\u8336\\u91d1\\u82b1\\u832f\\u7816\\u624b\\u7b51\\u832f\\u8336\\u7816\\u8336\\u53f6\\u4e2d\\u7cae\\u4e2d\\u8336\\u9ed1\\u8336\\u56ed\\u9648\\u97f5\\u91d1\\u78161kg\",\"price\":\"431.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1063\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/709def8ffc3a695d9a0cc23bf00ef4dc.jpg\",\"title\":\"\\u7f16\\u7ec7\\u888b\\u88c5\\u4e09\\u7ea7\\u67a3 \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"2.25\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1089\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/c68ac9a4ed80854700fbbf8edde22f53.jpg\",\"title\":\"\\u65b0\\u7586\\u7279\\u4ea7\\u6563\\u88c5\\u6279\\u53d1\\u7ea2\\u67a3\\u548c\\u7530\\u5927\\u67a3\\u9a8f\\u67a3\\u4e8c\\u7ea7\\u76ae\\u76ae\\u67a3\\u5382\\u5bb6\\u76f4\\u9500\\u7cbe\\u54c1 \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"4.50\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1090\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/f154a49813baeee4d15f0fb5c9fcb00a.jpg\",\"title\":\"\\u65b0\\u54c1\\u5b81\\u590f\\u7279\\u4ea7\\u4e2d\\u5b81\\u67b8\\u675e\\u5382\\u5bb6\\u6279\\u53d1\\u76f4\\u9500250g\\u888b\\u88c5\\u65e0\\u5bb3\\u7cbe\\u54c1 \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"27.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1091\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/d5077ae20dba4b7f60e81767759fdecd.jpg\",\"title\":\"\\u65b0\\u7586\\u7279\\u4ea7\\u6709\\u673a\\u65e0\\u5bb3\\u67a3\\u6563\\u88c5\\u6563\\u67a3\\u7cbe\\u54c1 \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"18.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1092\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/1b176ef4244fde24299a3b645e4a5899.jpg\",\"title\":\"\\u795e\\u519c\\u67b6\\u7279\\u4ea7 \\u91ce\\u751f\\u845b\\u6839\\u7c89250g\\u88c5 \\u845b\\u7c89 \\u4f18\\u8d28\\u845b\\u7c89 \\u5382\\u5bb6\\u76f4\\u9500 \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"41.00\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1093\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/733c080de53ff5d7d686994623b844e2.jpg\",\"title\":\"\\u795e\\u519c\\u67b6\\u7279\\u4ea7\\u91ce\\u751f\\u82e6\\u835e\\u8336\\u53f6\\u793c\\u76d2\\u88c5450g \\u5382\\u5bb6\\u76f4\\u9500\\u4ee3\\u7406\\u52a0\\u76df\\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"239.40\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1094\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com:80\\/Uploads\\/server\\/upload\\/813ed498cc178d1da023c5af75b2291f.jpg\",\"title\":\"\\u795e\\u519c\\u67b6\\u4f18\\u8d28\\u571f\\u8c46\\u5e72 \\u98ce\\u5e72\\u571f\\u8c46\\u5757\\u7eff\\u8272\\u65e0\\u6c61\\u67d3\\u6709\\u673a\\u98df\\u54c1 \\u5382\\u5bb6\\u76f4\\u9500 500g \\u4e00\\u4ef6\\u4ee3\\u53d1\",\"price\":\"36.50\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"goods_detail\\\",\\\"goods_id\\\":\\\"1095\\\"}\"}]}}";
// "{\"status\":1,\"info\":\"\\u6210\\u529f\",\"data\":{\"keyword\":\"\\u597d\\u5403\\u7684\\u6c34\\u841d\\u535c\",\"slider\":[{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/d5e4c2746e85a79c361bc23075e97aaf.jpg\"},{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/6b6de9f1c5f8562fe066789e8e47f244.jpg\"},{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/8b32de1f26727027e62b22446c967d4b.jpg\"}],\"cates\":[{\"name\":\"\\u7eff\\u8272\\u6709\\u673a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/jifen.png\"},{\"name\":\"\\u7cae\\u6cb9\\u8c03\\u5473\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/tejia.png\"},{\"name\":\"\\u4f11\\u95f2\\u98df\\u54c1\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/haohuo.png\"},{\"name\":\"\\u9152\\u6c34\\u996e\\u6599\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/tuangou.png\"},{\"name\":\"\\u575a\\u679c\\u7092\\u8d27\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"},{\"name\":\"\\u5730\\u65b9\\u5c55\\u5385\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"},{\"name\":\"\\u79ef\\u5206\\u5546\\u57ce\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"},{\"name\":\"\\u6d3b\\u52a8\\u4e13\\u533a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"},{\"name\":\"\\u4f1a\\u5458\\u4e13\\u533a\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"},{\"name\":\"\\u575a\\u679c\\u7092\\u8d27\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\"}],\"news\":[{\"title\":\"\\u3010\\u4e0a\\u65b0\\u3011\\u597d\\u5403\\u7684\\u82f9\\u679c\\u4e0a\\u7ebf\\u4e86\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"title\":\"\\u3010\\u4f11\\u95f2\\u3011\\u8fd9\\u4e2a\\u6691\\u5047\\u53bb\\u54ea\\u91cc\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"title\":\"\\u3010\\u751f\\u6d3b\\u3011\\u660e\\u5929\\u5927\\u96e8\\u6765\\u4e86\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}],\"news_pic\":{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/server\\/upload\\/d5e4c2746e85a79c361bc23075e97aaf.jpg\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},\"goods_week\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u5546\\u54c1\\u6807\\u9898\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}],\"goods_fruit\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6c34\\u679c\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6c34\\u679c\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6c34\\u679c\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}]},\"goods_meat\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8089\\u79bd\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8089\\u79bd\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8089\\u79bd\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}]},\"goods_seafood\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6d77\\u9c9c\\u5e72\\u8d27\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6d77\\u9c9c\\u5e72\\u8d27\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u6d77\\u9c9c\\u5e72\\u8d27\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}]},\"goods_import\":{\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\",\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"items\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8fdb\\u53e3\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8fdb\\u53e3\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u8fdb\\u53e3\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}]},\"goods_more\":[{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"},{\"pic\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"title\":\"\\u66f4\\u591a\",\"price\":\"19.9\",\"badge\":\"http:\\/\\/www.landeb.com\\/Uploads\\/app_demo\\/cates\\/quanbu.png\",\"act\":\"{\\\"act\\\":\\\"toast\\\",\\\"message\\\":\\\"\\\\u7b49\\\\u5f85\\\\u5b9e\\\\u73b0\\\"}\"}]}}";

    private static final String BASE_URL = "baseUrl";

    @BindView(R.id.fixed_frag_home_tv_time1)
    TextView fixedFragHomeTvTime1;
    @BindView(R.id.fixed_frag_home_tv_time2)
    TextView fixedFragHomeTvTime2;
    @BindView(R.id.fixed_frag_home_tv_time3)
    TextView fixedFragHomeTvTime3;
    @BindView(R.id.fixed_frag_home_tv_time4)
    TextView fixedFragHomeTvTime4;
    @BindView(R.id.fixed_frag_home_iv_miaosha1)
    ImageView fixedFragHomeIvMiaosha1;
    @BindView(R.id.fixed_frag_home_iv_miaosha2)
    ImageView fixedFragHomeIvMiaosha2;
    @BindView(R.id.fixed_frag_home_iv_miaosha3)
    ImageView fixedFragHomeIvMiaosha3;
    @BindView(R.id.fixed_frag_home_iv_miaosha4)
    ImageView fixedFragHomeIvMiaosha4;

    private BeanFixedFragHome mBeanFixedFragHome;
    private boolean isViewPrepared = false;
    private boolean isLoaded = false;
    private Unbinder mUnbinder;

    private List<String> mBannerUrlList = new ArrayList<>();
    private List<BeanFixedFragHome.DataBean.CatesBean> mCateList = new ArrayList<>();
    private List<String> mMarqueeList = new ArrayList<>();

    private List<MyBadgeItem> mWeeklyList = new ArrayList<>();
    private List<MyBadgeItem> mBlock1List = new ArrayList<>();
    private List<MyBadgeItem> mBlock2List = new ArrayList<>();
    private List<MyBadgeItem> mBlock3List = new ArrayList<>();
    private List<MyBadgeItem> mBlock4List = new ArrayList<>();
    private List<MyBadgeItem> mMoreList = new ArrayList<>();


    private FixedFragHomeGVAdapter mGVadpter;


    @BindView(R.id.fixed_frag_home_srl)
    SwipeRefreshLayout fixedFragHomeSrl;
    @BindView(R.id.fixed_frag_home_btn_scan)
    LinearLayout fixedFragHomeBtnLeft;
    @BindView(R.id.fixed_frag_home_btn_search)
    Button fixedFragHomeBtnSearch;
    @BindView(R.id.fixed_frag_home_btn_message)
    LinearLayout fixedFragHomeBtnRight;
    @BindView(R.id.fixed_frag_home_banner)
    Banner fixedFragHomeBanner;
    @BindView(R.id.fixed_frag_home_GridView)
    FixedGridView fixedFragHomeGridView;
    @BindView(R.id.fixed_frag_home_marqueeView)
    MarqueeView fixedFragHomeMarqueeView;
    @BindView(R.id.fixed_frag_home_imgV_ad)
    ImageView fixedFragHomeImgVAd;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r1c1)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR1c1;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r1c2)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR1c2;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r1c3)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR1c3;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r2c1)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR2c1;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r2c2)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR2c2;
    @BindView(R.id.fixed_frag_home_benzhoujingxuan_r2c3)
    MyBadgeItem fixedFragHomeBenzhoujingxuanR2c3;
    @BindView(R.id.fixed_frag_home_block1_iv)
    ImageView fixedFragHomeBlock1Img;
    @BindView(R.id.fixed_frag_home_block1_item1)
    MyBadgeItem fixedFragHomeBlock1Item1;
    @BindView(R.id.fixed_frag_home_block1_item2)
    MyBadgeItem fixedFragHomeBlock1Item2;
    @BindView(R.id.fixed_frag_home_block1_item3)
    MyBadgeItem fixedFragHomeBlock1Item3;
    @BindView(R.id.fixed_frag_home_block2_iv)
    ImageView fixedFragHomeBlock2Img;
    @BindView(R.id.fixed_frag_home_block2_item1)
    MyBadgeItem fixedFragHomeBlock2Item1;
    @BindView(R.id.fixed_frag_home_block2_item2)
    MyBadgeItem fixedFragHomeBlock2Item2;
    @BindView(R.id.fixed_frag_home_block2_item3)
    MyBadgeItem fixedFragHomeBlock2Item3;
    @BindView(R.id.fixed_frag_home_block3_iv)
    ImageView fixedFragHomeBlock3Img;
    @BindView(R.id.fixed_frag_home_block3_item1)
    MyBadgeItem fixedFragHomeBlock3Item1;
    @BindView(R.id.fixed_frag_home_block3_item2)
    MyBadgeItem fixedFragHomeBlock3Item2;
    @BindView(R.id.fixed_frag_home_block3_item3)
    MyBadgeItem fixedFragHomeBlock3Item3;
    @BindView(R.id.fixed_frag_home_block4_iv)
    ImageView fixedFragHomeBlock4Img;
    @BindView(R.id.fixed_frag_home_block4_item1)
    MyBadgeItem fixedFragHomeBlock4Item1;
    @BindView(R.id.fixed_frag_home_block4_item2)
    MyBadgeItem fixedFragHomeBlock4Item2;
    @BindView(R.id.fixed_frag_home_block4_item3)
    MyBadgeItem fixedFragHomeBlock4Item3;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r1c1)
    MyBadgeItem fixedFragHomeGenduoshangpinR1c1;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r1c2)
    MyBadgeItem fixedFragHomeGenduoshangpinR1c2;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r1c3)
    MyBadgeItem fixedFragHomeGenduoshangpinR1c3;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r2c1)
    MyBadgeItem fixedFragHomeGenduoshangpinR2c1;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r2c2)
    MyBadgeItem fixedFragHomeGenduoshangpinR2c2;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r2c3)
    MyBadgeItem fixedFragHomeGenduoshangpinR2c3;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r3c1)
    MyBadgeItem fixedFragHomeGenduoshangpinR3c1;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r3c2)
    MyBadgeItem fixedFragHomeGenduoshangpinR3c2;
    @BindView(R.id.fixed_frag_home_genduoshangpin_r3c3)
    MyBadgeItem fixedFragHomeGenduoshangpinR3c3;
    private String mBaseUrl;
    private String mTestBaseUrl;
    private Retrofit mRetrofit;
    private FixedFragHomeRequest mFragHomeRequest;


    public static FixedFragHome newInstance(String baseUrl) {
        FixedFragHome fragment = new FixedFragHome();
        Bundle args = new Bundle();
        args.putString(BASE_URL, baseUrl);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //获取frag数据
        if (getArguments() != null) {
            mBaseUrl = getArguments().getString(BASE_URL);
        }

        //  初始化网络读取组件
        OkHttpClient client = MyApplication.getClient();
        mTestBaseUrl = MyApplication.BASE_URL;
        mRetrofit = new Retrofit.Builder()
                .baseUrl(mTestBaseUrl)
                .addConverterFactory(GsonConverterFactory.create())
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .client(client)
                .build();
        mFragHomeRequest = mRetrofit.create(FixedFragHomeRequest.class);
//
//        //初始化首页数据，从SP中读取，若没有首页数据，本地加载
//        mGson = new Gson();
//        mPreferences = getActivity().getSharedPreferences(HOME_DATA, Context.MODE_PRIVATE);
//        mEditor = mPreferences.edit();
//        String homeData = mPreferences.getString(HOME_DATA, HOME_DATA_DEFAULT);
//
////        if (homeData != null) {
//        BeanFragHome beanFragHome = mGson.fromJson(homeData, BeanFragHome.class);
//        mBeanFragHome = beanFragHome;
//
//


    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.frag_home_fixed, container, false);

        mUnbinder = ButterKnife.bind(this, view);

        mBeanFixedFragHome = new Gson().fromJson(GSON, BeanFixedFragHome.class);


        /** 初始化数据*/
        initData();

        refreshView();
        /** 绑定事件*/
        initEvent();

        isViewPrepared = true;
        if (!isLoaded && getUserVisibleHint()) {
            fixedFragHomeSrl.setRefreshing(true);
            refreshData();
            isLoaded = true;
        }

        return view;
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()) {
            case R.id.fixed_frag_home_btn_scan:

                Intent intent = new Intent(getActivity(), CaptureActivity.class);
                getActivity().startActivityForResult(intent, MainActivity.ZXING_REQUEST);

                break;
            case R.id.fixed_frag_home_btn_search:

                SearchActivity.toAct(getContext(),fixedFragHomeBtnSearch.getText().toString());

                break;
            case R.id.fixed_frag_home_btn_message:
                WelcomeActivity.toAct(getActivity());

                break;
        }

    }

    @Override
    public void setUserVisibleHint(boolean isVisibleToUser) {
        super.setUserVisibleHint(isVisibleToUser);
        if (isVisibleToUser) {

            if (isViewPrepared && !isLoaded) {
                refreshData();
                isLoaded = true;
            }
        }

    }

    @Override
    public void onDestroy() {
        super.onDestroy();

        isViewPrepared = false;
        isLoaded = false;

    }


    private void refreshData() {

        mFragHomeRequest.getFragHomeIndex()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Subscriber<BeanFixedFragHome>() {
                    @Override
                    public void onCompleted() {
                        fixedFragHomeSrl.setRefreshing(false);
                    }

                    @Override
                    public void onError(Throwable e) {
                        fixedFragHomeSrl.setRefreshing(false);
                    }

                    @Override
                    public void onNext(BeanFixedFragHome beanFixedFragHome) {
                        mBeanFixedFragHome = beanFixedFragHome;

                        refreshView();
                    }
                });

    }

    private void initEvent() {

        fixedFragHomeSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                refreshData();
            }
        });

        fixedFragHomeBanner.setOnBannerListener(new OnBannerListener() {
            @Override
            public void OnBannerClick(int position) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getSlider().get(position).getAct(), getContext());

            }
        });

        fixedFragHomeGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Json2Act.makeJson2Act(mCateList.get(position).getAct(), getActivity());
            }
        });

        fixedFragHomeMarqueeView.setOnItemClickListener(new MarqueeView.OnItemClickListener() {
            @Override
            public void onItemClick(int position, TextView textView) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getNews().get(position).getAct(), getContext());

            }
        });

        // TODO: 2017/7/28 秒杀事件
        fixedFragHomeIvMiaosha1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getMiaosha_goods().get(0).getAct(),getContext());
            }
        });
        fixedFragHomeIvMiaosha2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getMiaosha_goods().get(1).getAct(),getContext());

            }
        });
        fixedFragHomeIvMiaosha3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getMiaosha_goods().get(2).getAct(),getContext());

            }
        });
        fixedFragHomeIvMiaosha4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getMiaosha_goods().get(3).getAct(),getContext());

            }
        });

        fixedFragHomeImgVAd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getNews_pic().getAct(), getContext());
            }
        });

        for (int i = 0; i < mWeeklyList.size(); i++) {
            final int finalI = i;
            mWeeklyList.get(i).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_week().get(finalI).getAct(), getContext());

                }
            });
        }

        fixedFragHomeBlock1Img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_fruit().getAct(), getContext());

            }
        });

        for (int i = 0; i < mBlock1List.size(); i++) {

            final int finalI = i;
            mBlock1List.get(i).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    Log.e( "onClick: .", mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(finalI).getAct());


                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(finalI).getAct(), getContext());

                }
            });
        }

        fixedFragHomeBlock2Img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_meat().getAct(), getContext());

            }
        });

//        for (int i = 0; i < mBlock2List.size(); i++) {
//
//            final int finalI = i;
//            mBlock2List.get(i).setOnClickListener(new View.OnClickListener() {
//                @Override
//                public void onClick(View v) {
//                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(finalI).getAct(), getContext());
//
//                }
//            });
//        }

        fixedFragHomeBlock2Item1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_meat().getItems().get(0).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(0).getAct(), getContext());
            }
        });

        fixedFragHomeBlock2Item2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_meat().getItems().get(1).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(1).getAct(), getContext());
            }
        });

        fixedFragHomeBlock2Item3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_meat().getItems().get(2).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(2).getAct(), getContext());
            }
        });



        fixedFragHomeBlock3Img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_seafood().getAct(), getContext());

            }
        });
//        for (int i = 0; i < mBlock3List.size(); i++) {
//
//            final int finalI = i;
//            mBlock2List.get(i).setOnClickListener(new View.OnClickListener() {
//                @Override
//                public void onClick(View v) {
//                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(finalI).getAct(), getContext());
//
//                }
//            });
//        }

        fixedFragHomeBlock3Item1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(0).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(0).getAct(), getContext());
            }
        });

        fixedFragHomeBlock3Item2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(1).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(1).getAct(), getContext());
            }
        });

        fixedFragHomeBlock3Item3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .",mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(2).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(2).getAct(), getContext());
            }
        });




        fixedFragHomeBlock4Img.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_import().getAct(), getContext());

            }
        });

//        for (int i = 0; i < mBlock4List.size(); i++) {
//
//            final int finalI = i;
//            mBlock2List.get(i).setOnClickListener(new View.OnClickListener() {
//                @Override
//                public void onClick(View v) {
//
//                    Log.e( "onClick: .", mBeanFixedFragHome.getData().getGoods_import().getItems().get(finalI).getAct());
//
//                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_import().getItems().get(finalI).getAct(), getContext());
//
//                }
//            });
//        }

        fixedFragHomeBlock4Item1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .", mBeanFixedFragHome.getData().getGoods_import().getItems().get(0).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_import().getItems().get(0).getAct(), getContext());
            }
        });
        fixedFragHomeBlock4Item2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .", mBeanFixedFragHome.getData().getGoods_import().getItems().get(1).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_import().getItems().get(1).getAct(), getContext());
            }
        });

        fixedFragHomeBlock4Item3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e( "onClick: .", mBeanFixedFragHome.getData().getGoods_import().getItems().get(2).getAct());

                Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_import().getItems().get(2).getAct(), getContext());
            }
        });





        for (int i = 0; i < mMoreList.size(); i++) {
            final int finalI = i;
            mMoreList.get(i).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Json2Act.makeJson2Act(mBeanFixedFragHome.getData().getGoods_more().get(finalI).getAct(), getContext());

                }
            });
        }

        fixedFragHomeBtnSearch.setOnClickListener(this);
        fixedFragHomeBtnLeft.setOnClickListener(this);
        fixedFragHomeBtnRight.setOnClickListener(this);

    }

    private void initData() {

        fixedFragHomeSrl.setColorSchemeColors(getResources().getColor(R.color.colorPrimary));


        fixedFragHomeBanner.setImages(mBannerUrlList);
        fixedFragHomeBanner.setImageLoader(new BannerLoader());
        fixedFragHomeBanner.start().startAutoPlay();


        mGVadpter = new FixedFragHomeGVAdapter(mCateList, getContext());
        fixedFragHomeGridView.setAdapter(mGVadpter);

        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR1c1);
        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR1c2);
        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR1c3);
        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR2c1);
        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR2c2);
        mWeeklyList.add(fixedFragHomeBenzhoujingxuanR2c3);

        mBlock1List.add(fixedFragHomeBlock1Item1);
        mBlock1List.add(fixedFragHomeBlock1Item2);
        mBlock1List.add(fixedFragHomeBlock1Item3);

        mBlock2List.add(fixedFragHomeBlock2Item1);
        mBlock2List.add(fixedFragHomeBlock2Item2);
        mBlock2List.add(fixedFragHomeBlock2Item3);

        mBlock3List.add(fixedFragHomeBlock3Item1);
        mBlock3List.add(fixedFragHomeBlock3Item2);
        mBlock3List.add(fixedFragHomeBlock3Item3);

        mBlock4List.add(fixedFragHomeBlock4Item1);
        mBlock4List.add(fixedFragHomeBlock4Item2);
        mBlock4List.add(fixedFragHomeBlock4Item3);

        mMoreList.add(fixedFragHomeGenduoshangpinR1c1);
        mMoreList.add(fixedFragHomeGenduoshangpinR1c2);
        mMoreList.add(fixedFragHomeGenduoshangpinR1c3);
        mMoreList.add(fixedFragHomeGenduoshangpinR2c1);
        mMoreList.add(fixedFragHomeGenduoshangpinR2c2);
        mMoreList.add(fixedFragHomeGenduoshangpinR2c3);
        mMoreList.add(fixedFragHomeGenduoshangpinR3c1);
        mMoreList.add(fixedFragHomeGenduoshangpinR3c2);
        mMoreList.add(fixedFragHomeGenduoshangpinR3c3);


    }


    private void refreshView() {

        fixedFragHomeBtnSearch.setText(mBeanFixedFragHome.getData().getKeyword());


        List<String> updateList = new ArrayList<>();
        for (int i = 0; i < mBeanFixedFragHome.getData().getSlider().size(); i++) {
            updateList.add(mBeanFixedFragHome.getData().getSlider().get(i).getPic());
            Log.e("refreshView: ", mBeanFixedFragHome.getData().getSlider().get(i).getPic() + "");
        }
        fixedFragHomeBanner.update(updateList);


        mCateList.clear();
//        Log.e( "refreshView: ",mBeanFixedFragHome.getData().getCates().size()+"" );
//        for (int i = 0; i < mBeanFixedFragHome.getData().getCates().size(); i++) {
        mCateList.addAll(mBeanFixedFragHome.getData().getCates());
//        }
        mGVadpter.notifyDataSetChanged();

        mMarqueeList.clear();
        for (int i = 0; i < mBeanFixedFragHome.getData().getNews().size(); i++) {
            mMarqueeList.add(mBeanFixedFragHome.getData().getNews().get(i).getTitle());
        }
        fixedFragHomeMarqueeView.startWithList(mMarqueeList);

// TODO: 2017/7/28 秒杀赋值
        fixedFragHomeTvTime1.setText(mBeanFixedFragHome.getData().getMiaosha_time().get(0).getTime());
        fixedFragHomeTvTime2.setText(mBeanFixedFragHome.getData().getMiaosha_time().get(1).getTime());
        fixedFragHomeTvTime3.setText(mBeanFixedFragHome.getData().getMiaosha_time().get(2).getTime());
        fixedFragHomeTvTime4.setText(mBeanFixedFragHome.getData().getMiaosha_time().get(3).getTime());

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getMiaosha_goods().get(0).getPic())
                .into(fixedFragHomeIvMiaosha1);
        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getMiaosha_goods().get(1).getPic())
                .into(fixedFragHomeIvMiaosha2);
        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getMiaosha_goods().get(2).getPic())
                .into(fixedFragHomeIvMiaosha3);
        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getMiaosha_goods().get(3).getPic())
                .into(fixedFragHomeIvMiaosha4);

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getNews_pic().getPic())
                .into(fixedFragHomeImgVAd);

        for (int i = 0; i < mWeeklyList.size(); i++) {
            mWeeklyList.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_week().get(i).getPic());
            mWeeklyList.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_week().get(i).getBadge());
            mWeeklyList.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_week().get(i).getTitle());
            mWeeklyList.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_week().get(i).getPrice());
        }

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getGoods_fruit().getPic())
                .into(fixedFragHomeBlock1Img);
        for (int i = 0; i < mBlock1List.size(); i++) {
            mBlock1List.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(i).getPic());
            mBlock1List.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(i).getBadge());
            mBlock1List.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(i).getTitle());
            mBlock1List.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_fruit().getItems().get(i).getPrice());

        }

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getGoods_meat().getPic())
                .into(fixedFragHomeBlock2Img);
        for (int i = 0; i < mBlock2List.size(); i++) {
            mBlock2List.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(i).getPic());
            mBlock2List.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(i).getBadge());
            mBlock2List.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(i).getTitle());
            mBlock2List.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_meat().getItems().get(i).getPrice());

        }

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getGoods_seafood().getPic())
                .into(fixedFragHomeBlock3Img);
        for (int i = 0; i < mBlock3List.size(); i++) {
            mBlock3List.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(i).getPic());
            mBlock3List.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(i).getBadge());
            mBlock3List.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(i).getTitle());
            mBlock3List.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_seafood().getItems().get(i).getPrice());

        }

        Glide.with(getContext())
                .load(mBeanFixedFragHome.getData().getGoods_import().getPic())
                .into(fixedFragHomeBlock4Img);
        for (int i = 0; i < mBlock4List.size(); i++) {
            mBlock4List.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_import().getItems().get(i).getPic());
            mBlock4List.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_import().getItems().get(i).getBadge());
            mBlock4List.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_import().getItems().get(i).getTitle());
            mBlock4List.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_import().getItems().get(i).getPrice());

        }

        for (int i = 0; i < mMoreList.size(); i++) {
            mMoreList.get(i).setmImg(mBeanFixedFragHome.getData().getGoods_more().get(i).getPic());
            mMoreList.get(i).setmBadge(mBeanFixedFragHome.getData().getGoods_more().get(i).getBadge());
            mMoreList.get(i).setmTilte(mBeanFixedFragHome.getData().getGoods_more().get(i).getTitle());
            mMoreList.get(i).setmPrice(mBeanFixedFragHome.getData().getGoods_more().get(i).getPrice());

        }
    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();
        mUnbinder.unbind();
    }
}
